package com.ltkj.shop.domain;

import java.math.BigDecimal;

import com.fasterxml.jackson.databind.annotation.JsonSerialize;
import com.fasterxml.jackson.databind.ser.std.ToStringSerializer;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import com.ltkj.common.core.annotation.Excel;
import com.ltkj.common.core.web.domain.BaseEntity;

/**
 * 文创购物车对象 shop_cart
 * 
 * @author xupf
 * @date 2023-08-29
 */
@ApiModel(value = "文创购物车")
public class ShopCart extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 购物车id */
    @ApiModelProperty("购物车id")
    private Long id;

    /** 商品id */
    @ApiModelProperty("商品id")
    private Long goodsId;

    /** 用户id */
    @ApiModelProperty("用户id")
    @JsonSerialize(using = ToStringSerializer.class)
    private Long userId;

    /** 商品名称 */
    @Excel(name = "商品名称")
    @ApiModelProperty("商品名称")
    private String name;

    /** 商品规格 */
    @Excel(name = "商品规格")
    @ApiModelProperty("商品规格")
    private String type;

    /** 商品原价格 */
    @Excel(name = "商品原价格")
    @ApiModelProperty("商品原价格")
    private BigDecimal priceSrc;

    /** 商品数量 */
    @Excel(name = "商品数量")
    @ApiModelProperty("商品数量")
    private Long goodsNum;

    /** 商品实际价格 */
    @Excel(name = "商品实际价格")
    @ApiModelProperty("商品实际价格")
    private BigDecimal price;

    /** 促销立减（备用） */
    @ApiModelProperty("促销立减（备用）")
    private BigDecimal reduction;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setGoodsId(Long goodsId) 
    {
        this.goodsId = goodsId;
    }

    public Long getGoodsId() 
    {
        return goodsId;
    }
    public void setUserId(Long userId) 
    {
        this.userId = userId;
    }

    public Long getUserId() 
    {
        return userId;
    }
    public void setName(String name) 
    {
        this.name = name;
    }

    public String getName() 
    {
        return name;
    }
    public void setType(String type) 
    {
        this.type = type;
    }

    public String getType() 
    {
        return type;
    }
    public void setPriceSrc(BigDecimal priceSrc) 
    {
        this.priceSrc = priceSrc;
    }

    public BigDecimal getPriceSrc() 
    {
        return priceSrc;
    }
    public void setGoodsNum(Long goodsNum) 
    {
        this.goodsNum = goodsNum;
    }

    public Long getGoodsNum() 
    {
        return goodsNum;
    }
    public void setPrice(BigDecimal price) 
    {
        this.price = price;
    }

    public BigDecimal getPrice() 
    {
        return price;
    }
    public void setReduction(BigDecimal reduction) 
    {
        this.reduction = reduction;
    }

    public BigDecimal getReduction() 
    {
        return reduction;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("goodsId", getGoodsId())
            .append("userId", getUserId())
            .append("name", getName())
            .append("type", getType())
            .append("priceSrc", getPriceSrc())
            .append("goodsNum", getGoodsNum())
            .append("price", getPrice())
            .append("reduction", getReduction())
            .append("createBy", getCreateBy())
            .append("createTime", getCreateTime())
            .append("updateBy", getUpdateBy())
            .append("updateTime", getUpdateTime())
            .toString();
    }
}
